package com.ucode.wap.cgms.service;

import com.ucode.model.cgms.form.CgmsCompanionOrderCreateForm;
import com.ucode.model.cgms.form.CgmsCompanionOrderReportForm;
import com.ucode.model.cgms.form.CgmsJointServiceUserAddForm;
import com.ucode.model.cgms.vo.CgmsCompanionOrderVO;
import com.ucode.tool.base.Paginator;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * 陪玩订单API service接口
 * @Author: liliang
 * @Date: 2025/5/12 21:43
 * @Version: 1.0
 */
public interface ApiCgmsCompanionOrderService {

    /**
     * 提交订单
     * @return 支付订单ID
     */
    public Long submitOrder(CgmsCompanionOrderCreateForm form);

    /**
     * 继续支付
     * @param orderId 订单编号
     * @param payAppId 支付应用编号
     * @return
     */
    public Long continuePay(Long orderId,Long payAppId);

    /**
     * 更新订单备注
     * @param orderId
     * @param remark
     */
    public void updateRemark(Long orderId,String remark);

    /**
     * 用户手动取消订单
     * @param orderId 订单id
     */
    public void cancel(Long orderId);

    /**
     * 确认完工
     * @param orderId
     */
    public void confirmCompleted(Long orderId);
    /**
     * 确认接单
     * @param orderId
     */
    public void confirmReceive(Long orderId);

    /**
     * 拒绝接单
     * @param orderId
     */
    public void refuseReceive(Long orderId);

    /**
     * 完工报备
     * @param companionOrderReportForm
     */
    public void companionReport(CgmsCompanionOrderReportForm companionOrderReportForm);

    /**
     * 添加联合服务人员
     * @param form
     */
    public void addJointServiceUser(CgmsJointServiceUserAddForm form);
    /**
     * 支付成功回调
     * @param orderId
     * @param payOrderId
     * @param payType
     * @param payTime
     * @param payAmount
     */
    public void paySuccess(Long orderId, Long payOrderId, String payType, LocalDateTime payTime, Integer payAmount);

    /**
     * 订单删除
     * @param orderId 订单id
     * @return Boolean
     */
    public void delete(Long orderId);

    /**
     * 订单详情
     * @param orderId
     * @return
     */
    public CgmsCompanionOrderVO detail(Long orderId);

    /**
     * 分页列表
     * @param condition
     * @param pageSize
     * @param pageNum
     * @return
     */
    public Paginator<CgmsCompanionOrderVO>  pageList(Map<String,Object> condition, Integer pageSize,Integer pageNum);

    /**
     * 待抢订单列表
     * @return
     */
    public List<CgmsCompanionOrderVO> queryCompanionUserSnatchOrderList();

    /**
     * 抢单
     * @param orderId
     */
    public void snatchOrder(Long orderId);
}
